﻿<!DOCTYPE html>
<html>
<head>
    <title>{$platform.name}</title>
    <link href="/static/css/framework-font.css" rel="stylesheet"/>
    <script src="/static/js/jquery-2.1.1.js"></script>
    <script src="/static/bootstrap/js/bootstrap.js"></script>
    <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
    <!--    <link href="/static/css/dialog.css" rel="stylesheet"/>-->
    <!--    <script src="/static/js/dialog.js"></script>-->
    <script src="/static/js/jquery.cookie.js"></script>
    <link href="/static/css/framework-theme.css" rel="stylesheet"/>
    <script src="/static/js/framework-ui.js"></script>
    <script src="/static/js/framework-clientdata.js"></script>
    <script src="/static/js/yii.js"></script>

    <!--引用layui弹框插件-->
    <link href="/static/layui/css/layui.css" rel="stylesheet"/>
    <script src="/static/layui/layui.js"></script>


        {if condition="$swidthStyle eq 0"}
    <link href="/static/css/pattern/public.css" rel="stylesheet"/>
    {else/}
        {if condition="$swidthStyle eq 0"}
    <link href="/static/css/pattern/public.css" rel="stylesheet"/>
    {else/}
    <link href="/static/css/default/public.css" rel="stylesheet"/>
    {/if}
    {/if}
</head>
<body>
<style>
    html,body{height:100%}
    .modal-body{background-color:#fff!important;height:80%}
    .form-horizontal .control-label{display: inline-block;width:10%;
        text-align:justify!important;
        text-align-last:justify;/*解决IE的支持*/ }
    .title{font-size:16px;background-color:#fff;margin:15px 0px;line-height:45px;padding-left:30px;}
    .zxd_label{float: left;line-height:35px;}
    .layui-input-block{margin-left:0px!important;}
    .layui-form-item{border-bottom:1px #ccc dashed}
    .modal-div{display: inline-block;width:100%;background-color:#fff;padding:15px 30px;}
    .modal_label .zxd_label{width:70px!important;}
</style>
<div class="newtest">
    <div class="container new_serach">
        {volist name="powerList" id="vo"}
        <a class="btn btn-primary btn-sm" href="{$vo['url']}">{$vo.name}</a>
        {/volist}
    </div>

    <div class="title">
        项目配置
    </div>


    <div class="modal-div">
        <form class="layui-form" action="">

            <!--<div class="layui-form-item">-->
                <!--<label class="zxd_label layui-col-md2">项目类型:</label>-->
                <!--<div class="layui-col-md4" >-->
                    <!--<input name="pro_type" value="{$config.pro_type}" class="layui-input">-->
                    <!--<p style="display: block">格式1:省级项目|2:政府项目</p>-->
                <!--</div>-->
            <!--</div>-->

            <!--<div class="layui-form-item">-->
                <!--<label class="zxd_label layui-col-md2">责任单位:</label>-->
                <!--<div class="layui-col-md4" >-->
                    <!--<input name="duty_unit" value="{$config.duty_unit}" class="layui-input">-->
                    <!--<p style="display: block">格式1:中建二局|2:中建三局</p>-->
                    <!--<button>单位列表</button>-->
                <!--</div>-->
            <!--</div>-->


            <div class="layui-form-item">
                <label class="zxd_label">推进进度评论操作:</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="open" lay-skin="switch" lay-filter="switchTest" lay-text="ON|OFF" {if condition="$config['planUpdate'] eq 1"} checked=""  {/if}>
                </div>
            </div>

            <!--<div class="layui-form-item">-->
                <!--<label class="zxd_label layui-col-md2"><button type="button" class="layui-btn" id="update" >更新配置</button></label>-->
            <!--</div>-->

        </form>
    </div>

</div>

<script>
    layui.use(['form', 'layedit', 'laydate'], function() {
        var form = layui.form;

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            var status = this.checked;
            if(status==true){
                status = 1;
            }else{
                status = 2;
            }
            $.ajax({
                type: 'post',
                url: "{:URL('project/Config/update')}",
                data: {planUpdate:status},
                dataType: 'JSON',
                success: function (res) {
                },
            });
        });


        $("#update").click(function () {
            var data = $("form").serializeArray();
            $.ajax({
                type: 'post',
                url: "{:URL('project/Config/update')}",
                data:data,
                dataType: 'JSON',
                success: function (res) {
                    layer.alert(res.msg);
                },
            });
        });
    });
</script>
</body>
</html>
